)} )} ,System.Action{System.Exception},System.Action)} ,System.Func{System.Exception,--0},System.Func{--0})}
Notification.Accept(IObserver) method¶
Defined in
Type: NotificationSystem.Reactive
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public abstract void Accept(IObserver<T> observer) - 2.
public abstract TResult Accept<TResult>(IObserver<T, TResult> observer) - 3.
public abstract void Accept(Action<T> onNext, Action<Exception> onError, Action onCompleted) - 4.
public abstract TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)
1. Overload¶
public abstract void Accept(IObserver<T> observer)
Summary: Invokes the observer's method corresponding to the notification.
Parameters
| Name | Type | Description |
|---|---|---|
observer | IObserver | Observer to invoke the notification on. |
2. Overload¶
public abstract TResult Accept<TResult>(IObserver<T, TResult> observer)
Summary: Invokes the observer's method corresponding to the notification and returns the produced result.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the result returned from the observer's notification handlers. |
Parameters
| Name | Type | Description |
|---|---|---|
observer | [IObserver | Observer to invoke the notification on. |
Returns: TResult -- Result produced by the observation.
3. Overload¶
public abstract void Accept(Action<T> onNext, Action<Exception> onError, Action onCompleted)
Summary: Invokes the delegate corresponding to the notification.
Parameters
| Name | Type | Description |
|---|---|---|
onNext | Action | Delegate to invoke for an OnNext notification. |
onError | Action | Delegate to invoke for an OnError notification. |
onCompleted | Action | Delegate to invoke for an OnCompleted notification. |
4. Overload¶
public abstract TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)
Summary: Invokes the delegate corresponding to the notification and returns the produced result.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the result returned from the notification handler delegates. |
Parameters
| Name | Type | Description |
|---|---|---|
onNext | Func | Delegate to invoke for an OnNext notification. |
onError | Func | Delegate to invoke for an OnError notification. |
onCompleted | Func | Delegate to invoke for an OnCompleted notification. |
Returns: TResult -- Result produced by the observation.